package com.ice.work.moment.facade.crawler.enums;

/**
 * @Description 基金重仓爬取字段
 * @Author DELL
 * @Create 2019-01-09
 * @Since 1.0.0
 */
@SuppressWarnings("all")
public enum FundPositionEnum {

    SHARE_CODE(1, "shareCode", "股票代码"),
    CLOSE_AT(0, "closeAt", "截止日期"),
    HOLD_FUND_NUMBER(3, "holdFundNumber", "持有家数"),
    TOTAL_POSITIO_NNUMBER(5, "totalPositionNumber", "持股总数(万股)"),
    TOTAL_CAPITALIZATION(6, "totalCapitalization", "总持股市值/万"),
    CHANGE_HOLD_FUND_NUMBER(7, "changeHoldFundNumber", "家数增减"),
    CHANGE_POSITION_NUMBER(8, "changePositionNumber", "持股数增减/万股"),
    CHANGE_CAPITALIZATION(9, "changeCapitalization", "持股市值增减/万"),
    PRE_HOLD_FUND_NUMBER(10, "preHoldFundNumber", "上期持股家数");


    public Integer key;
    public String code;
    public String remark;

    FundPositionEnum(Integer key, String code, String remark) {
        this.key = key;
        this.code = code;
        this.remark = remark;
    }

    public static String getCodeByKey(Integer key) {
        for (FundPositionEnum gender : FundPositionEnum.values()) {
            if (gender.key.equals(key)) {
                return gender.code;
            }
        }
        return null;
    }
}
